import { ref,onMounted } from "vue"
import { getBannerAPI } from "@/apis/home"

//banner轮播图相关业务代码
export function useBanner(){
  let bannerData=ref([])
  let getBanner=async ()=>{
let res = await getBannerAPI({distributionSite:'2'})
bannerData.value = res.result
  }

  onMounted(()=>{
   getBanner()
  })
  return {
    bannerData
  }
}
